<template>
    <nav class="navBar">
        <ul class="navbarNav">
            <li class="navli"
            v-for="item in items">
                <router-link :to="{ path: '/'+item.url }">
                    <span class="navIcon">
                    <i :class="['fa', item.icon]"></i>
                    </span>
                    <span class="navText">{{ item.title }}</span>
                </router-link>
            </li>
        </ul>
    </nav>
    <!--/导航条-->
</template>
<style lang="scss">
.navBar {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 49px;
    line-height: 49px;
    z-index: 1010;
    .navbarNav {
        display: -o-box;
        display: -ms-box;
        display: box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        display: -webkit-box;
        -webkit-box-orient: horizontal;
        height: 49px;
        padding: 0 8px;
        text-align: center;
        background-color: #0e90d2;
        a {
            color: #FFF;
        }
        .navli {
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
            -webkit-box-flex: 1;
            -moz-box-flex: 1;
            -ms-box-flex: 1;
            -ms-flex-negative: 1;
            -webkit-flex-shrink: 1;
            flex-shrink: 1;
            .barLlist>a {
                display: block;
                border-bottom: 1px solid #0b6fa2;
                color: #fff;
                box-shadow: inset 0 1px rgba(220, 220, 220, .25);
                font-size: 12px;
            }
        }
    }
}
.navIcon {
    font-size: 16px;
    width: 24px;
    height: 24px;
    margin: 4px auto 0;
    display: block;
    line-height: 24px;
}
.navText {
    padding-top: 2px;
    line-height: 1;
    font-size: 12px;
    display: block;
    word-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.barLlist {
    display: none;
    position: absolute;
    bottom: 50px;
    margin: 0 auto;
    width: 72px;
    border-radius: 5px;
    text-align: center;
    background: #0e90d2;
    z-index: 99;
    line-height: 3;
    overflow: hidden;
    -webkit-animation: bounceInUp .5s ease;
    animation: bounceInUp .5s ease;
}
</style>
<script>
   export default {
       data () {
           return {
               items: [
                    { icon:'fa-home', title:'首页', url:'index'},
                    { icon:'fa-database', title:'数据' , url: 'data' },
                    { icon:'fa-location-arrow', title:'游戏', url: 'game'},
                    { icon:'fa-gear', title:'设置', url:'setting' }
                ]
            }
        }
    }
</script>
